﻿using StackAttack_WindowsFormApp.Helpers;
using StackAttack_WindowsFormApp.PlayersData;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace StackAttack_WindowsFormApp.Helper_Forms
{
    public partial class LeaderboardForm : Form
    {
        LeaderboardManager leaderBoardManager = new LeaderboardManager();
        
        public LeaderboardForm()
        {
            InitializeComponent();
            this.BackgroundImage = Image.FromFile(PathFinder.GetFullPathToFile("Images\\leaderboard.png"));
        }

        private void LeaderboardForm_Paint(object sender, PaintEventArgs e)
        {
            int change = 20;
            int y = 70;
            foreach (var player in leaderBoardManager.GetTopFivePlayers())
            {
                e.Graphics.DrawString(player, new Font("Showcard Gothic", 18), Brushes.Aqua, 25, y);
                y += change;
            }



        }

        

        

        
    }
}
